package com.anjie.powerproject.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class MainController {

    @RequestMapping("/")
    public String judgeIndex(HttpServletRequest request){
        Object loginManager = request.getSession().getAttribute("loginManager");
        if (loginManager != null) {
            return "redirect:/main.html";
        }

        return "login";
    }
}
